<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="../../css/reset.css">
    <link rel="stylesheet" href="../../css/index.css">
    <link rel="stylesheet" href="../../css/art.css">
</head>
<body>
<header>
    <h1>二狗子的Blog</h1>
    <h4>划船不用浆</h4>
</header>
<nav>
    <ul>
        <?php foreach($cats as $c){ ?>
        <li><a href="index.php?cat_id=<?php echo $c['cat_id'];?>"><?php echo $c['cat_name'];?></a></li>
        <?php } ?>
    </ul>
</nav>
<div id="main">
    <div id="lside">
        <article>
            <h2><a href="#"><?php echo $art['title'];?></a></h2>
            <div class="entry_header">
                <time><?php echo date('Y-m-d',$art['pubtime']); ?></time>
                by
                <a href="#">二狗子</a>
                <a class="catlink" href="#"><?php echo $art['cat_name']; ?></a>
                <a class="comment" href="#"><?php echo $art['comm']; ?></a>
            </div>
            <div class="entry_content">
                <?php if(isset($art['thumb_path'])) {?>
                <img src="<?php echo $art['thumb_path']; ?>">
                <?php }?>
                <?php echo $art['content']; ?>
            </div>
        </article>
        <?php if(!empty($comms)){?>
        <div id="comments">
            <?php foreach($comms as $v){ ?>
            <ol>
                <li>
                    <img src="https://secure.gravatar.com/avatar/582b66ad5ae1b69c7601a990cb9a661a?s=50&d=identicon&r=pg"
                         alt="">
                    <cite><a href="#"><?php echo $v['nick'];?></a></cite> <br>
                    <time><?php echo date('Y-m-d H:i',$v['pubtime']);?></time>
                    <span><?php echo long2ip($v['ip']);?></span>
                </li>
                <li>
                    <?php echo $v['content'];?>
                </li>
            </ol>
            <?php } ?>
        </div>
        <?php } ?>
        <div id="respond" class="comment-respond">
            <h3>Leave a Comment</h3>
            <form action="#" method="post">
                <p>
                    <input placeholder="your name" name="username" type="text" value="" size="30">
                </p>
                <p>
                    <input placeholder="Email" name="email" type="text" value="" size="30">
                </p>
                <p>
                    <textarea name="comment" cols="45" rows="8" aria-required="true"></textarea>
                <p>
                    <input type="submit" value="Post Comment">
                </p>
            </form>
        </div>
    </div>
    <div id="rside">
        <aside>
            <form action="">
                <input type="text" name="search" placeholder="Search...">
            </form>
        </aside>
        <aside>
            <h4>测试标题</h4>
            <ul>
                <li><a href="">文章标题</a>&nbsp;(1)</li>
                <li><a href="">文章标题</a>&nbsp;(3)</li>
                <li><a href="">文章标题</a>&nbsp;(5)</li>
                <li><a href="">文章标题</a>&nbsp;(3)</li>
            </ul>
        </aside>
        <aside>
            <h4>测试标题</h4>
            <ul>
                <li><a href="">文章标题1</a></li>
                <li><a href="">文章标题2</a></li>
                <li><a href="">文章标题3</a></li>
                <li><a href="">文章标题4</a></li>
            </ul>
        </aside>
        <aside>
            <h4>测试标题</h4>
            <ul>
                <li><a href="">文章标题1</a></li>
                <li><a href="">文章标题2</a></li>
                <li><a href="">文章标题3</a></li>
                <li><a href="">文章标题4</a></li>
            </ul>
        </aside>
        <aside>
            <h4>测试标题</h4>
            <ul>
                <li><a href="">文章标题1</a></li>
                <li><a href="">文章标题2</a></li>
                <li><a href="">文章标题3</a></li>
                <li><a href="">文章标题4</a></li>
            </ul>
        </aside>
    </div>
</div>
<footer>
    Copyright &copy; 2015 · GeneratePress · WordPress
</footer>
</body>
</html>